def fn1(list1):
    for i in range(len(list1)):
        for j in range(len(list1) - i - 1):
            if list1[j] > list1[j + 1]:
                list1[j], list1[j + 1] = list1[j + 1], list1[j]


def fn2(list1):
    for i in range(len(list1)):
        for j in range(len(list1) - i - 1):
            if list1[j] < list1[j + 1]:
                list1[j], list1[j + 1] = list1[j + 1], list1[j]


def find(x, list1):
    for i in range(len(list1)):
        if x == list1[i]:
            return x
    return -1


def fn4(x, list1):
    list2 = []
    for i in range(len(list1)):
        if x == list1[i]:
            list2.append(i)
    tuple1 = tuple(list2)
    return tuple1

